<%@include file="../../init.jsp"%>
<%@include file="../../header.jsp"%>
<%@ page import="groupware.Contact" %>

<%

if ( request.getParameter("address") != null ) {
		String address = request.getParameter("address");
		String telephone = request.getParameter("telephone");
		String fax = request.getParameter("fax");
		String email = request.getParameter("email");
		String website = request.getParameter("website");
        Contact contact = new Contact(address, telephone, fax, email, website);
	contact.save();
	out.print("New contact created");

} else {
%>
<br>
  <form action="/contactForm.jsp" method="POST">
   
    Address: <input type="text" size="40" name="address"><br>
    Telephone: <input type="text" size="40" name="telephone"><br>
    Fax: <input type="text" size="40" name="fax"><br>
    Email: <input type="text" size="40" name="email"><br>
    Website: <input type="text" size="40" name="website">
    <input type="submit" name="submit" value="Submit">
  </form>

  <hr>
  <a href="/projectList">View All</a>
  <% } %>
</body>
</html>